package com.opo5.logisticsmanagement.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.opo5.logisticsmanagement.dao.LocatorDao;
import com.opo5.logisticsmanagement.domain.Depot;
import com.opo5.logisticsmanagement.domain.Locator;
import com.opo5.logisticsmanagement.service.LocatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class LocatorServiceImpl extends ServiceImpl<LocatorDao, Locator> implements LocatorService {

    @Autowired
    private LocatorDao locatorDao;

    /**
     * 根据仓库名称、库位名称、库位容积进行查询
     */
    @Override
    public Depot getAll(String depotName,String locatorName,Integer locatorCapacity) {
        if (depotName==null){
            depotName="荷花路";
        }
       return locatorDao.getAll(depotName,locatorName,locatorCapacity);
    }

    @Override
    public Locator getLocatorByDepotNameLocatorName(String depotName, String locatorName) {
        return locatorDao.getLocatorByDepotNameLocatorName(depotName,locatorName);
    }

}
